from os import truncate

import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from datetime import datetime

from pandas.tseries.offsets import *

date_range = pd.date_range("20180201", periods=5)
time_series = pd.Series(np.arange(5), index=date_range)
time_series = time_series.shift(-1)  # 数据移动

print(date_range)
print(time_series)
